package com.test.rpc.test2;

import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.context.annotation.ImportBeanDefinitionRegistrar;
import org.springframework.core.type.AnnotationMetadata;

public class MyAutoConfiguredMyBatisRegistrar implements ImportBeanDefinitionRegistrar{

    /**
     * 动态置顶扫描包路径下特殊的类加载到Bean中
     * @param importingClassMetadata
     * @param registry
     */
    public void registerBeanDefinitions(AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry) {
        // 当前MyClassPathBeanDefinitionScanner已被修改为扫描带有指定注解的类
        System.out.println("hello");
        System.out.println(importingClassMetadata);
    }
}